package com.dosin.crowno.controller;

import com.dosin.crowno.pojo.UserAccount;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Select;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Slf4j
@Component
public class SchedulerTask {


    Logger log = LoggerFactory.getLogger(SchedulerTask.class);

    //cron表达式：每隔5秒执行一次
    @Scheduled(cron = "0/10 * * * * *")
    public void scheduled(){
        log.info("使用cron: {}");
    }


/*    @Select("select * from user_account WHERE username=#{username} AND password=#{password}")
    UserAccount selectByUserAndPass(String username, String password);

    @Select("select now()")
    Date now();*/
}
